package ru.pb.game.network.engine.client.packets.sendable;

import ru.pb.game.data.xml.holders.ChannelHolder;
import ru.pb.game.network.engine.client.packets.GameServerToClientPacket;
import ru.pb.game.objects.model.CHANNEL;

/**
 * Пакет новостей
 * 
 * @author: DarkSkeleton, Felixx
 * @version: 1.00
 */
public class PROTOCOL_SERVER_MESSAGE_ANNOUNCE_ACK extends GameServerToClientPacket
{
	private CHANNEL _channel;

	public PROTOCOL_SERVER_MESSAGE_ANNOUNCE_ACK(int channelId)
	{
		_channel = ChannelHolder.getChannel(channelId);
	}

	@Override
	public void writeImpl()
	{
		writeH(2574);
		writeD(1); //если есть анонсы
		writeH(_channel.getAnnounceSize()); // длина
		writeS(_channel.getAnnounce(), _channel.getAnnounceSize());
	}
}
